package com.java.jvm.demo.chapter01;


/**
 * @author wangning
 * @create 2021-10-14 21:06
 */
public class StringTest {
	private int a = 1;

//	public StringTest(int a) {
//		this.a = a;
//	}

	public static void main(String[] args) {
//		a = 7;//此处错误，因为呗final修饰的基本类型变量，值不能变。
		String s = new String("");
		System.out.println("hello");
		final int b = 2;
		System.out.println(b);
		StringTest stringTest = new StringTest();
		System.out.println(stringTest.getA());

	}

	public int getA() {
		return a;
	}

	public void test() {
		System.out.println(a);
	}
}

class Test {
	private static void print(){
		System.out.println("Print()");
	}
	public static void main(String[] args) {
		((Test)null).print();
		print();
	}
}
